package drg_group.zhejiang_2022.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.zhejiang_2022.Base;
import drg_group.zhejiang_2022.MedicalRecord;
import drg_group.zhejiang_2022.DRG.MDCR_DRG;

public class RA2 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={};
        String[] adrg_zd1={};
        String[] adrg_ss={"01.1200","01.1300x001","01.1300x002","01.1301","01.1400","01.2400x005","01.2400x009","01.2400x013","01.2400x018","01.2405","01.2407","01.2412","01.2413","01.2414","01.2415","02.0101","02.0102","02.0201","02.0202","02.0203","02.0300x001","02.0400x003","02.0500x004","02.0500x005","02.0502","02.0600x003","02.0700","03.3201","03.3202","03.4x00x002","03.4x00x004","06.0900x004","06.2x00","06.2x01","06.2x02","06.3900x003","06.3900x004","06.3900x012","06.3900x013","06.4x00","06.4x02","06.5200","07.2102","07.2902","16.9200","21.3103","21.3104","21.3200x003","21.6901","21.6903","22.1100x002","22.5300x004","22.6201","22.6303","25.0200","25.1x01","25.1x02","25.1x03","25.1x04","25.1x05","25.2x00","25.2x01","26.1100x003","26.1200x001","26.1200x002","26.2901","26.2903","26.2904","26.3100x008","26.3100x009","26.3101","26.3104","26.3201","26.3203","27.3101","27.4902","27.9900x005","27.9901","28.2x00x002","28.2x00x003","28.2x02","28.2x04","28.9200x002","28.9201","29.3900x019","29.3901","29.3905","30.0900x016","30.0903","31.5x04","32.2400x001","32.2500x001","33.2000","33.2000x002","33.2402","33.2500x002","33.2500x003","33.2700x001","33.2800x001","34.2000","34.2100x001","34.2400x001","34.2501","34.2502","34.2600","34.2700x001","37.2401","37.2500x001","37.9100","38.8605","39.7900x017","39.9800x001","39.9801","40.1100x003","40.1100x004","40.1100x005","40.1100x006","40.2100","40.2300","40.2400","40.2900x002","40.2900x008","40.2900x019","40.2900x020","40.2900x021","40.2901","40.2904","40.2906","40.2908","40.2910","40.3x00x002","40.4000","40.5903","41.3300","41.4200x003","41.9100x001","41.9200","42.1100","42.1200","42.1901","42.2100","42.2200","42.2500","42.3200x003","42.3201","42.3300x006","42.3301","42.3303","42.3305","42.3306","42.3309","43.0x00x003","43.0x02","43.1100x001","43.1900x003","43.1900x005","43.4100x011","43.4100x013","43.4100x014","43.4100x015","43.4100x016","43.4101","43.4202","44.1500","45.1101","45.1200x001","45.2600","45.3001","45.3004","45.3005","45.3007","45.3300x012","45.3300x013","45.3300x014","45.4200x003","45.4201","45.4202","45.4300x008","45.4300x009","45.4300x012","45.4302","45.4304","45.4307","46.0401","46.0402","46.1000","46.1000x007","46.1100","46.1100x002","46.1300","46.1301","46.1400","46.2100","46.2300x001","46.2301","46.2400","46.3200x002","46.3900x002","46.3900x006","46.3900x007","46.3901","46.3902","46.3904","46.3905","46.4101","46.4102","46.4103","46.8600","47.0100","48.2500","48.3507","48.3508","48.3509","48.3510","48.3512","48.3513","50.1101","50.1200","50.1400","50.2301","50.2302","50.2303","50.2401","50.2402","50.2403","50.2404","50.2502","50.2900x020","50.2902","50.2904","50.2905","50.2908","50.2909","50.6101","50.6900x002","50.6901","50.9401","50.9402","50.9900x003","51.1301","51.1302","51.8400x001","51.8500x002","51.8501","51.8502","51.8503","51.8600x002","51.8700x001","51.8700x003","51.8700x004","51.9100","51.9200","51.9501","51.9600x001","51.9800x001","51.9800x005","51.9800x008","51.9800x009","51.9800x010","51.9800x012","51.9800x013","51.9800x015","51.9800x016","51.9801","51.9806","51.9807","51.9808","51.9901","52.1101","52.1200","52.9201","52.9300x002","52.9400","52.9400x002","54.0x00x002","54.0x00x004","54.0x00x006","54.0x00x010","54.0x00x013","54.0x00x018","54.0x00x021","54.0x00x022","54.0x00x023","54.0x00x024","54.0x00x025","54.0x01","54.0x02","54.0x03","54.0x04","54.0x05","54.0x06","54.0x07","54.0x08","54.1100","54.2100","54.2100x005","54.2200x003","54.2300x003","54.2301","54.2302","54.2303","54.2402","54.2405","54.2406","54.3x00x004","54.3x00x010","54.3x00x011","54.3x00x027","54.3x01","54.3x02","54.3x03","54.3x04","54.3x05","54.4x02","54.6101","54.6301","54.6400","54.6401","54.7100","54.7200x001","54.9300x001","54.9902","55.3301","55.3302","56.4100x012","56.5101","56.5102","56.5200x001","56.6100x001","56.6100x003","56.6100x004","56.8100","56.8200x002","56.8201","56.8300","56.8400x001","56.8401","56.8500","56.8600","57.1200","57.1901","57.1902","57.1903","57.1905","57.2100","57.4100x002","57.6x00","57.8200","57.8900x003","57.8900x004","57.8903","57.9102","57.9201","57.9600","57.9900x001","58.0x00x003","58.0x01","58.0x02","58.1x01","58.3101","58.3103","58.3901","58.3902","58.3903","58.3904","58.3905","58.3906","58.4301","58.4302","58.4303","58.4304","58.4305","58.9102","58.9200x002","58.9201","58.9300x001","58.9901","59.0000","59.0201","59.0202","59.0203","59.0301","59.0302","59.0303","59.0901","59.0902","59.0903","59.1901","59.1902","60.2100x001","60.2900x003","60.2901","60.2902","60.6100x001","60.6100x002","60.6101","60.6200","60.6201","60.6900x001","60.6900x002","62.3x00","62.3x01","62.3x02","63.4x00","65.1200x001","65.1300","67.2x00","67.2x01","67.3904","67.4x08","68.1300","68.1400","68.1501","68.1601","68.2903","68.2915","68.2917","71.2400x003","77.4103","77.4200","77.4701","77.4900x004","77.4901","77.4904","77.6201","83.3200x001","83.3900x017","83.3904","83.4900","85.2100x003","85.2100x019","85.2200","86.3x02","86.3x03","86.3x10x067","86.3x13","86.4x02"};
        String[] adrg_ss1={};
        
        if (true && record.ssList!=null && record.ssList.length>0 && Base.intersect(record.ssList,adrg_ss)){
            Base.groupMessages.putMessage(record.Index,"符合RA2入组条件，匹配规则：某一手术匹配");
                
            if (MDCR_DRG.RA21_group(record)){
                return "RA21";
            }
    
            if (MDCR_DRG.RA23_group(record)){
                return "RA23";
            }
    
            if (MDCR_DRG.RA25_group(record)){
                return "RA25";
            }

            return "RA2";
        }else{
            return "";
        }
    }
}

